package model;

import java.net.InetAddress;

/**
 * Class representing a user
 * Package  model
 * Project ChatSystemG5 - INSA 4INFOA1 - 2013/2014
 * @author Thomas Vuillemin Martin Conant
 */
public class User {
	private String name;
	private InetAddress ipAdress;
	
	/**
	 * get the name of the user
	 * @return the name of the user
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * set the name of the user
	 * @param name the name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * get the IpAdress of the user
	 * @return the InetAdress of the user
	 */
	public InetAddress getIpAdress() {
		return ipAdress;
	}
	
	/**
	 * set the IpAdress of the user
	 * @param ipAdress the InetAdress of the user
	 */
	public void setIpAdress(InetAddress ipAdress) {
		this.ipAdress = ipAdress;
	}
	
	/**
	 * Constructor of the user
	 * Set the name and ipAdress fields
	 * @param name the name of the user
	 * @param ipAdress the InetAdress of the user
	 */
	public User(String name, InetAddress ipAdress) {
		super();
		this.name = name;
		this.ipAdress = ipAdress;
	}
	
	/**
	 * Basic constructor of User
	 */
	public User() {
		// TODO Auto-generated constructor stub
		super();
	}
	
	/**
	 * toString method
	 * @return the name of the user
	 */
	public String toString() {
		return (this.name);
	}
}
